<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>sunJsona的个人博客</title>

  <!-- keywords -->
  

  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="# 添加docker权限给当前用户（可以使docker命令免sudo）1. 添加 docker group12sunchang@sunchang-PC:~$ sudo groupadd dockergroupadd：“docker”组已存在 2. 将用户添加到docker组12sunchang@sunchang-PC:~$ sudo gpasswd -a $&amp;#123;USER&amp;#125; doc">
<meta property="og:type" content="article">
<meta property="og:title" content="sunJsona的个人博客">
<meta property="og:url" content="https://xiaochangzai.github.io/2022/02/23/docker/docker学习笔记/index.html">
<meta property="og:site_name" content="sunJsona的个人博客">
<meta property="og:description" content="# 添加docker权限给当前用户（可以使docker命令免sudo）1. 添加 docker group12sunchang@sunchang-PC:~$ sudo groupadd dockergroupadd：“docker”组已存在 2. 将用户添加到docker组12sunchang@sunchang-PC:~$ sudo gpasswd -a $&amp;#123;USER&amp;#125; doc">
<meta property="og:locale" content="Simple Chinese">
<meta property="og:image" content="https://p9-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/47c371cc298e49a9b0401c82f6c6d6d2~tplv-k3u1fbpfcp-watermark.image?">
<meta property="og:updated_time" content="2022-02-23T05:42:00.906Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="sunJsona的个人博客">
<meta name="twitter:description" content="# 添加docker权限给当前用户（可以使docker命令免sudo）1. 添加 docker group12sunchang@sunchang-PC:~$ sudo groupadd dockergroupadd：“docker”组已存在 2. 将用户添加到docker组12sunchang@sunchang-PC:~$ sudo gpasswd -a $&amp;#123;USER&amp;#125; doc">
<meta name="twitter:image" content="https://p9-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/47c371cc298e49a9b0401c82f6c6d6d2~tplv-k3u1fbpfcp-watermark.image?">
  
    <link rel="alternative" href="/atom.xml" title="sunJsona的个人博客" type="application/atom+xml">
  
  
    <link rel="icon" href="http://7xkj1z.com1.z0.glb.clouddn.com/head.jpg">
  
  <link rel="stylesheet" href="/css/style.css">
  
  

  <script src="//cdn.bootcss.com/require.js/2.3.2/require.min.js"></script>
  <script src="//cdn.bootcss.com/jquery/3.1.1/jquery.min.js"></script>

  
</head>
<body>
  <div id="container">
    <div id="particles-js"></div>
    <div class="left-col">
    <div class="overlay"></div>
<div class="intrude-less">
	<header id="header" class="inner">
		<a href="/" class="profilepic">
			
			<img lazy-src="http://7xkj1z.com1.z0.glb.clouddn.com/head.jpg" class="js-avatar">
			
		</a>

		<hgroup>
		  <h1 class="header-author"><a href="/">sunJsona</a></h1>
		</hgroup>

		

		
			<div class="switch-btn">
				<div class="icon">
					<div class="icon-ctn">
						<div class="icon-wrap icon-house" data-idx="0">
							<div class="birdhouse"></div>
							<div class="birdhouse_holes"></div>
						</div>
						<div class="icon-wrap icon-ribbon hide" data-idx="1">
							<div class="ribbon"></div>
						</div>
						
						<div class="icon-wrap icon-link hide" data-idx="2">
							<div class="loopback_l"></div>
							<div class="loopback_r"></div>
						</div>
						
						
					</div>
					
				</div>
				<div class="tips-box hide">
					<div class="tips-arrow"></div>
					<ul class="tips-inner">
						<li>菜单</li>
						<li>标签</li>
						
						<li>友情链接</li>
						
						
					</ul>
				</div>
			</div>
		

		<div class="switch-area">
			<div class="switch-wrap">
				<section class="switch-part switch-part1">
					<nav class="header-menu">
						<ul>
						
							<li><a href="/">主页</a></li>
				        
							<li><a href="/archives">所有文章</a></li>
				        
						</ul>
					</nav>
					<nav class="header-nav">
						<div class="social">
							
						</div>
					</nav>
				</section>
				
				
				<section class="switch-part switch-part2">
					<div class="widget tagcloud" id="js-tagcloud">
						
					</div>
				</section>
				
				
				
				<section class="switch-part switch-part3">
					<div id="js-friends">
					
			          <a target="_blank" class="main-nav-link switch-friends-link" href="https://github.com/smackgg/hexo-theme-smackdown">smackdown</a>
			        
			        </div>
				</section>
				

				
			</div>
		</div>
	</header>				
</div>
    </div>
    <div class="mid-col">
      <nav id="mobile-nav">
  	<div class="overlay">
  		<div class="slider-trigger"></div>
  		<h1 class="header-author js-mobile-header hide">sunJsona</h1>
  	</div>
	<div class="intrude-less">
		<header id="header" class="inner">
			<div class="profilepic">
				<img lazy-src="http://7xkj1z.com1.z0.glb.clouddn.com/head.jpg" class="js-avatar">
			</div>
			<hgroup>
			  <h1 class="header-author">sunJsona</h1>
			</hgroup>
			
			<nav class="header-menu">
				<ul>
				
					<li><a href="/">主页</a></li>
		        
					<li><a href="/archives">所有文章</a></li>
		        
		        <div class="clearfix"></div>
				</ul>
			</nav>
			<nav class="header-nav">
				<div class="social">
					
				</div>
			</nav>
		</header>				
	</div>
</nav>
      <div class="body-wrap"><article id="post-docker/docker学习笔记" class="article article-type-post" itemscope itemprop="blogPost">
  
    <div class="article-meta">
      <a href="/2022/02/23/docker/docker学习笔记/" class="article-date">
  	<time datetime="2022-02-23T05:41:08.341Z" itemprop="datePublished">2022-02-23</time>
</a>
    </div>
  
  <div class="article-inner">
    
      <input type="hidden" class="isFancy" />
    
    
    <div class="article-entry" itemprop="articleBody">
      
        <h2 id="添加docker权限给当前用户（可以使docker命令免sudo）"><a href="#添加docker权限给当前用户（可以使docker命令免sudo）" class="headerlink" title="# 添加docker权限给当前用户（可以使docker命令免sudo）"></a># 添加docker权限给当前用户（可以使docker命令免sudo）</h2><h4 id="1-添加-docker-group"><a href="#1-添加-docker-group" class="headerlink" title="1. 添加 docker group"></a>1. 添加 docker group</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">sunchang@sunchang-PC:~$ sudo groupadd docker</span><br><span class="line">groupadd：“docker”组已存在</span><br></pre></td></tr></table></figure>
<h4 id="2-将用户添加到docker组"><a href="#2-将用户添加到docker组" class="headerlink" title="2. 将用户添加到docker组"></a>2. 将用户添加到docker组</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">sunchang@sunchang-PC:~$ sudo gpasswd -a <span class="variable">$&#123;USER&#125;</span> docker</span><br><span class="line">正在将用户“sunchang”加入到“docker”组中</span><br></pre></td></tr></table></figure>
<h4 id="3-重启docker服务"><a href="#3-重启docker服务" class="headerlink" title="3. 重启docker服务"></a>3. 重启docker服务</h4><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sunchang@sunchang-PC:~$ sudo service docker restart</span><br></pre></td></tr></table></figure>
<h4 id="4-查看用户组及成员"><a href="#4-查看用户组及成员" class="headerlink" title="4. 查看用户组及成员"></a>4. 查看用户组及成员</h4><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">sunchang@sunchang-PC:~$ cat /etc/group | grep docker</span><br><span class="line">docker:x:997:sunchang</span><br></pre></td></tr></table></figure>
<h2 id="运行一个HelloWorld"><a href="#运行一个HelloWorld" class="headerlink" title="运行一个HelloWorld"></a>运行一个HelloWorld</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker run ubuntu <span class="built_in">echo</span> <span class="string">"Hello World"</span></span><br></pre></td></tr></table></figure>
<p>解释： 使用ubuntu 镜像创建一个容器，并在这个容器里运行命令： <code>echo &quot;Hello World&quot;</code></p>
<h2 id="让运行的容器实现对话能力"><a href="#让运行的容器实现对话能力" class="headerlink" title="让运行的容器实现对话能力"></a>让运行的容器实现对话能力</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker run -i -t ubuntu /bin/bash</span><br></pre></td></tr></table></figure>
<ul>
<li><strong>-t:</strong>  在新容器内指定一个伪终端或终端。</li>
<li><strong>-i:</strong>  允许你对容器内的标准输入 (STDIN) 进行交互。<br>可以通过运行 exit 命令或者使用 CTRL+D 来退出容器。<h4 id="启动容器（后台模式）"><a href="#启动容器（后台模式）" class="headerlink" title="启动容器（后台模式）"></a>启动容器（后台模式）</h4>使用以下命令创建一个以进程方式运行的容器<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">docker run -d ubuntu /bin/sh -c &quot;while true; do echo hello world; sleep 1; done&quot;</span><br><span class="line"></span><br><span class="line">2b1b7a428627c51ab8810d541d759f072b4fc75487eed05812646b8534a2fe63</span><br></pre></td></tr></table></figure>
</li>
</ul>
<p>这个时候，只是输出了一个id，这个是容器的id。</p>
<h4 id="如何将本地目录映射到宿主机里？"><a href="#如何将本地目录映射到宿主机里？" class="headerlink" title="如何将本地目录映射到宿主机里？"></a>如何将本地目录映射到宿主机里？</h4><p>docker run 参数后面添加 -v /path/to/local:/path/to/target，注意的是windows系统需要按如下格式写：<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker run -p 80:80 -v /D/docker/web:/usr/share/nginx/html/web -d nginx</span><br></pre></td></tr></table></figure></p>
<p>-p 映射端口号，如果要映射多个端口号，可以写多个 -p。如:<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker run -p 80:80 -p:443:443 -d nginx</span><br></pre></td></tr></table></figure></p>
<p>-d 在后台运行</p>
<h4 id="vim编辑文件"><a href="#vim编辑文件" class="headerlink" title="vim编辑文件"></a>vim编辑文件</h4><p>不是所有的容器都自带vim，像nginx的容器默认是没有vim的。这个时候需要手动安装:<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">apt-get update</span><br><span class="line">apt-get install vim</span><br></pre></td></tr></table></figure></p>
<p>这样就可以啦~</p>
<h3 id="查看正在运行的容器"><a href="#查看正在运行的容器" class="headerlink" title="查看正在运行的容器"></a>查看正在运行的容器</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">docker ps</span><br><span class="line"></span><br><span class="line">CONTAINER ID        IMAGE                  COMMAND              ...  </span><br><span class="line">5917eac21c36        ubuntu:15.10           <span class="string">"/bin/sh -c 'while t…"</span>    ...</span><br></pre></td></tr></table></figure>
<p>输出详情介绍：</p>
<p><strong>CONTAINER ID:</strong>  容器 ID。</p>
<p><strong>IMAGE:</strong>  使用的镜像。</p>
<p><strong>COMMAND:</strong>  启动容器时运行的命令。</p>
<p><strong>CREATED:</strong>  容器的创建时间。</p>
<p><strong>STATUS:</strong>  容器状态。</p>
<p>状态有7种：</p>
<ul>
<li>created（已创建）</li>
<li>restarting（重启中）</li>
<li>running 或 Up（运行中）</li>
<li>removing（迁移中）</li>
<li>paused（暂停）</li>
<li>exited（停止）</li>
<li>dead（死亡）</li>
</ul>
<p><strong>PORTS:</strong>  容器的端口信息和使用的连接类型（tcp\udp）。</p>
<p><strong>NAMES:</strong>  自动分配的容器名称。</p>
<h2 id="查看容器日志"><a href="#查看容器日志" class="headerlink" title="查看容器日志"></a>查看容器日志</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker logs 2b1b7a428627</span><br></pre></td></tr></table></figure>
<p><img src="https://p9-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/47c371cc298e49a9b0401c82f6c6d6d2~tplv-k3u1fbpfcp-watermark.image?" alt="image.png"></p>
<h2 id="停止容器"><a href="#停止容器" class="headerlink" title="停止容器"></a>停止容器</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker stop amazing_cori</span><br></pre></td></tr></table></figure>
<h2 id="重启容器"><a href="#重启容器" class="headerlink" title="重启容器"></a>重启容器</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker stop amazing_cori</span><br></pre></td></tr></table></figure>
<h2 id="进入容器"><a href="#进入容器" class="headerlink" title="进入容器"></a>进入容器</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker attach 1e560fca3906</span><br></pre></td></tr></table></figure>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">Microsoft Windows [版本 10.0.19042.804]</span><br><span class="line">(c) 2020 Microsoft Corporation. 保留所有权利。</span><br><span class="line"></span><br><span class="line">C:\Users\hz21087108&gt;docker ps</span><br><span class="line">CONTAINER ID   IMAGE     COMMAND   CREATED        STATUS        PORTS     NAMES</span><br><span class="line">8b07524256a1   ubuntu    <span class="string">"bash"</span>    22 hours ago   Up 22 hours             vigorous_banach</span><br><span class="line"></span><br><span class="line">C:\Users\hz21087108&gt;docker attach 8b07524256a1</span><br><span class="line">root@8b07524256a1:/<span class="comment"># ls</span></span><br><span class="line">bin  boot  dev  etc  home  lib  lib32  lib64  libx32  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var</span><br><span class="line">root@8b07524256a1:/<span class="comment">#</span></span><br></pre></td></tr></table></figure>
<h3 id="注意：-如果从这个容器退出，会导致这个容器停止-Ctl-D"><a href="#注意：-如果从这个容器退出，会导致这个容器停止-Ctl-D" class="headerlink" title="注意： 如果从这个容器退出，会导致这个容器停止(Ctl + D)"></a>注意： 如果从这个容器退出，会导致这个容器停止(Ctl + D)</h3><h2 id="exec-命令"><a href="#exec-命令" class="headerlink" title="exec 命令"></a>exec 命令</h2><p>使用容器执行命令<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker exec -it 243c32535da7 bash</span><br></pre></td></tr></table></figure></p>
<h3 id="注意：-如果从这个容器退出，容器不会停止。所以进入容器的时候要使用exec-而不是-attach-。"><a href="#注意：-如果从这个容器退出，容器不会停止。所以进入容器的时候要使用exec-而不是-attach-。" class="headerlink" title="注意： 如果从这个容器退出，容器不会停止。所以进入容器的时候要使用exec 而不是 attach 。"></a>注意： 如果从这个容器退出，容器不会停止。所以进入容器的时候要使用<code>exec</code> 而不是 <code>attach</code> 。</h3><h2 id="删除容器"><a href="#删除容器" class="headerlink" title="删除容器"></a>删除容器</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker rm -f 1e560fca3906</span><br></pre></td></tr></table></figure>
<h3 id="f-force的缩写，强制删除。"><a href="#f-force的缩写，强制删除。" class="headerlink" title="-f: --force的缩写，强制删除。"></a>-f: <code>--force</code>的缩写，强制删除。</h3><h2 id="清理掉所有处于终止状态的容器"><a href="#清理掉所有处于终止状态的容器" class="headerlink" title="清理掉所有处于终止状态的容器"></a>清理掉所有处于终止状态的容器</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker container prune</span><br></pre></td></tr></table></figure>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line">C:\Users\hz21087108&gt;docker container prune</span><br><span class="line">WARNING! This will remove all stopped containers.</span><br><span class="line">Are you sure you want to <span class="built_in">continue</span>? [y/N] y</span><br><span class="line">Deleted Containers:</span><br><span class="line">8b07524256a17d161e34d3c4577c3d59513e1d45028ac942e763170140b72867</span><br><span class="line">a61ede1df2433c977135f84fb5f5616040c8be1d1666958f8fe61164e38764ab</span><br><span class="line">c866412441ac925395e7a874d28b0e7ff1578b13ca905b657b7dc2f71b120330</span><br><span class="line">cc2bf6cb885b24df037e3022a8e27bd7682cdcd38a5b8d62f5b0b7bc06064a64</span><br><span class="line">c0e18126807e507b9a46107cdebbcf851795c2a2a32016d1a37bbfac0f31ee8b</span><br><span class="line">c75514cf5a47ac346de4e912151b761daf50f5494c5412d63a748c94cbf47128</span><br><span class="line">f34c9768ab1721aa297f3917280b6b9646cfe1655145c6a54bcf6684ae80ef0d</span><br><span class="line"></span><br><span class="line">Total reclaimed space: 2.906kB</span><br><span class="line"></span><br><span class="line">C:\Users\hz21087108&gt;docker ps -a</span><br><span class="line">CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES</span><br><span class="line"></span><br><span class="line">C:\Users\hz21087108&gt;</span><br></pre></td></tr></table></figure>
<h2 id="查看web容器信息"><a href="#查看web容器信息" class="headerlink" title="查看web容器信息"></a>查看web容器信息</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">docker ps</span><br><span class="line">docker ps -a</span><br></pre></td></tr></table></figure>
<p><code>-a</code> 是显示全部容器，包括不在运行中的</p>
<h2 id="查看指定容器的端口映射"><a href="#查看指定容器的端口映射" class="headerlink" title="查看指定容器的端口映射"></a>查看指定容器的端口映射</h2><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">docker port bf08b7f2cd89</span><br><span class="line">5000/tcp -&gt; 0.0.0.0:5000</span><br></pre></td></tr></table></figure>
<h2 id="查看web应用程序的日志"><a href="#查看web应用程序的日志" class="headerlink" title="查看web应用程序的日志"></a>查看web应用程序的日志</h2><p><code>docker logs [容器ID或者名字]</code> 可以查看容器的标准输出, <code>-f</code> 参数可以让容器log标准输出。</p>

      
    </div>
    
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2022/02/23/npm/mvn在mac安装遇到的坑/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">&lt;</strong>
      <div class="article-nav-title">
        
          (no title)
        
      </div>
    </a>
  
  
    <a href="/2020/07/07/CSS属性顺序/" id="article-nav-older" class="article-nav-link-wrap">
      <div class="article-nav-title">CSS属性顺序</div>
      <strong class="article-nav-caption">&gt;</strong>
    </a>
  
</nav>

  
</article>


<div class="ds-share share" data-thread-key="docker/docker学习笔记" data-title="" data-url="https://xiaochangzai.github.io/2022/02/23/docker/docker学习笔记/"  data-images="http://7xkj1z.com1.z0.glb.clouddn.com/head.jpg" data-content="">
    <div class="ds-share-inline">
      <ul  class="ds-share-icons-16">
      	<li data-toggle="ds-share-icons-more"><a class="ds-more" href="javascript:void(0);">分享到：</a></li>
        <li><a class="ds-weibo" href="javascript:void(0);" data-service="weibo">微博</a></li>
        <li><a class="ds-qzone" href="javascript:void(0);" data-service="qzone">QQ空间</a></li>
        <li><a class="ds-qqt" href="javascript:void(0);" data-service="qqt">腾讯微博</a></li>
        <li><a class="ds-wechat" href="javascript:void(0);" data-service="wechat">微信</a></li>
      </ul>
      <div class="ds-share-icons-more">
      </div>
    </div>
 </div>
 





</div>
      <footer id="footer">
  <div class="outer">
    <div id="footer-info">
      <div class="footer-left">
        &copy; 2022 sunJsona
      </div>
        <div class="footer-right">
          <a href="http://hexo.io/" target="_blank">Hexo</a>  Theme <a href="https://github.com/smackgg/hexo-theme-smackdown" target="_blank">Smackdown</a>
        </div>
    </div>
  </div>
</footer>
    </div>
    
  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">


<script>
	var yiliaConfig = {
		fancybox: true,
		mathjax: true,
		animate: true,
		isHome: false,
		isPost: true,
		isArchive: false,
		isTag: false,
		isCategory: false,
		open_in_new: false
	}
</script>
<script src="/js/main.js"></script>



<script type="text/x-mathjax-config">
MathJax.Hub.Config({
    tex2jax: {
        inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
        processEscapes: true,
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
    }
});

MathJax.Hub.Queue(function() {
    var all = MathJax.Hub.getAllJax(), i;
    for(i=0; i < all.length; i += 1) {
        all[i].SourceElement().parentNode.className += ' has-jax';                 
    }       
});
</script>

<script src="//cdn.bootcss.com/mathjax/2.7.0/MathJax.js"></script>


  </div>
</body>
</html>